<?php
	/**
	* Author:rui
	* Email:zer0131@vip.qq.com
	* 反馈模块
	*/
	class FeedbackAction extends AdminbaseAction{
		public function _initialize() {
	        parent::_initialize();
    	}

    	public function index(){
    		$obj = M('Feedback');
    		$count = $obj->count();
        	$page = $this->page($count, 5);
    		$list = $obj->limit($page->firstRow . ',' . $page->listRows)->order('addtime desc')->select();
    		$this->assign('data',$list);
    		$this->assign("Page", $page->show('Admin'));
    		$this->display();
    	}

    	public function del(){
    		$id = (int)$this->_get("id");
	        $obj = M("Feedback");
	        $status = $obj->where(array("id"=>$id))->delete();
	        if($status !== false){
	            $this->success("删除成功！");
	        }else{
	            $this->error("删除失败！");
	        }
    	}
	}
?>